<{include file="section/admin/admin_header.tpl"}>
<LINK href="http://cms.f.itc.cn/upload/ihome/js/calendar/css/calendar.css" type="text/css" rel="stylesheet" />
<LINK href="http://cms.f.itc.cn/upload/ihome/js/calendar/css/alternate.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src='http://cms.f.itc.cn/upload/ihome/js/calendar/mootools.js'></script>
<script type="text/javascript" src='http://cms.f.itc.cn/upload/ihome/js/calendar/calendar.rc4.js'></script>
<body>
<{include file="section/admin/admin_header_login_bar.tpl"}>

<div id="contentA" class="clear" style="width:1300px;">
	<!--leftsidebar sr-->
	<{include file="section/admin/admin_left_sidebar.tpl"}>
    <!--/leftsidebar end-->
    <div class="rightCont">
    	<!--path st-->
        <div class="path">您的位置：<a href="/">首页</a>&gt; &nbsp;订单列表&gt; &nbsp;</div>
        <!--/path end-->
    	<h2 class="title01"><span style="color:red;"><{$shop_name}></span><span>&nbsp;&nbsp;订单列表</span></h2>
        <div class="line1"></div>
		<!--box02 st-->
		<div class="box02">
            <div class="box02_1">
                <div class="search02 clear">
                	<form action="/orders/list/" id="frm_query" method="get">
                    <ul>
					<li>
					订单编号：<input type="text" class="in2" style="width:80px;" name="order_id" value="<{$query.order_id}>"/>
					 &nbsp;&nbsp;创建时间： <input type="text" class="in2" style="width:70px;" id="begin_time" size="10" name="create_time_greater" value='<{php}>echo date('Y-m-d',$this->_tpl_vars['query']['create_time_greater']);<{/php}>' /> 
				    <input type="text" class="in2" style="width:70px;" id="end_time" size="10" name="create_time_less" value='<{php}>echo date('Y-m-d',$this->_tpl_vars['query']['create_time_less']);<{/php}>' />
					 <select name="pay_status" style="width:120px;" id="pay_status">
						<option value="">付款状态</option>
						<{foreach from=$pay_status key=key item=value}>
						<option value='<{$key}>' <{if $query.status == $key}>selected<{/if}>><{$value}></option>
						<{/foreach}>
					</select>		  
					<input type="hidden" value="<{$merchant_id}>" name="merchant_id" /></li> 
					<input type="submit" value="查询" class="btn01" /></li> 
					</ul>
          			</form>
                </div>
                <div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div class="tl">订单编号</div></th>
                        <th><div>实付款（元）</div></th>
                        <th><div>下单时间</div></th>
                        <th><div>交易状态</div></th>
                        <th><div>买家</div></th>
                        <th><div>详情</div></th>
                        </tr>

						<{foreach from=$list.list key=key item=item}>
						<tr>
						<td class="tl"><{$item.order_id}></td>
                        <td>￥<{$item.money_real}></td>
						<td><{php}>echo date('Y-m-d H:i:s',$this->_tpl_vars['item']['create_time']);<{/php}></td>
						<td><{if $item.status == ''}><{else}><span class="green"> <{$item.status}> </span><br /><{/if}><span class="red"> <{$item.status_refund_name}> </span></td>
						<td><a href="/member/detail/<{$item.member_uid}>" target="_blank">详情</a></td>
						<td><a href="/orders/detail/<{$item.order_id}>" target="_blank">查看</a></td>
                        </tr>
						<{/foreach}>
                        </table>
                    </div>
                </div>
                <div class="box02_lab clear">
                	共计：<{$total}> &nbsp; <{$pagination}>
                </div>
            </div>
		</div>
		<!--box02 end-->
    </div>
</div>
</body>
<script type="text/javascript">
var frm_query = document.getElementById('frm_query');
frm_query.onsubmit = function ()
{
}
with(frm_query)
{
}

function on_delete(tp)
{
	if(tp=='ok'){
		frm_del.submit();
	}
	if(tp=='cancel'){
		ymPrompt.close();
	}
	if(tp=='close'){
		ymPrompt.close();
	}
}
function select_all(obj)
{
	if(obj.value == '0')
	{
		var chk = document.getElementsByTagName('input');
		for(var i=0;i<chk.length;i++)
		{
			if(chk[i].name.indexOf("u_") == 0)
			{
				chk[i].checked = true;
			}
		}
		obj.value = '1';
	}
	else
	{
		obj.checked = false;
		obj.value = '0';
	}
}
function select_one(obj)
{
	if(obj.checked == false)
	{
		frm_del.chk_all.checked = false;
		frm_del.chk_all.value = '0';
	}
}

window.addEvent('domready', function() {
	myCal = new Calendar({ begin_time: 'Y-m-d'},{classes:['alternate'],navigation:2,tweak:{x:0,y:-20}});
	myCal = new Calendar({ end_time: 'Y-m-d'},{classes:['alternate'],navigation:2,tweak:{x:0,y:-20}});

	$begin_str = '';
	var begin_time = $('begin_time');
	if (begin_time.value == '') begin_time.value = $begin_str;
		begin_time.onfocus = function() {
		this.className = 'in1';
		if(this.value == $begin_str) this.value='';        
	}
	begin_time.onblur = function() {
		this.className='in2';
		if(this.value=='') this.value = $begin_str;
	}

	$end_str = "";
	var end_time = $('end_time');
	if (end_time.value == '') end_time.value = $end_str;
	end_time.onfocus = function() {
	this.className = 'in1';
	if(this.value == $end_str) this.value='';        
	}
	end_time.onblur = function() {
	this.className='in2';
	if(this.value=='') this.value = $end_str;
	}
																								 
});

</script></html>
